/*
 * Bismillahirrahmanirrahim...
 * Software ini bebas untuk anda gunakan dan kembangkan
 * Segala resiko akibat penggunaan software ini ditanggung sendiri ya...
 * Semoga bermanfaat, Amin...
 */

package KomponenGUI;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
import javax.swing.JOptionPane;

/**
 *
 * @author farazinux
 */
public class OptionPane extends JOptionPane {

    private Paint paint;
    private Shape shape;

    public OptionPane() {
        setOpaque(false);
    }

    @Override
    protected void paintComponent(Graphics g) {
        Graphics2D gd = (Graphics2D) g.create();

        paint = new GradientPaint(0, 0, Color.black, 0, getHeight(), Color.GREEN);
        shape = new Rectangle2D.Double(0, 0, getWidth(), getHeight());

        gd.setPaint(paint);
        gd.fill(shape);

        gd.dispose();
        super.paintComponent(g);
    }





}
